/**
 * weapp-js
 * https://code.aliyun.com/jionglee/weapp_base.git
 * Copyright@ 2021 Motigo, Inc.
 * 
 */
export default {
    isValidUrl(url) {
        /*
            校验url合法性

            参数说明：
                url:网络资源url
        */
        var valid = false;
        if (url && typeof url == 'string') {
            var reg = /^(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-.,@?^=%&:/~+#]*[\w\-@?^=%&/~+#])?/;
            valid = reg.test(url);
        }
        return valid;
    }
};
